package com.chb.wordcount;


import java.io.IOException;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;

public class TestFileSatus {
	public static void main(String[] args) throws IOException {
		Configuration conf = new Configuration();
		Path hdfsPath = new Path("/apps/test/input");
		FileSystem fs = FileSystem.get(hdfsPath.toUri(), conf);
		
		FileStatus[] fileSatus = fs.listStatus(hdfsPath);
		for (FileStatus fileStatus : fileSatus) {
			System.out.println(fileStatus.getPath().toString());
		}
		
		
		
	}
}
